package cn.javasea.logback.mail.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *@ClassName DemoController
 *@Description TODO
 *@Author longxiaonan@163.com
 *@Date 2021/8/5 0005 11:10
 */
@RestController
@Slf4j
public class DemoController {

    @GetMapping("div")
    public String div(int a, int b) {
        try {
            return String.valueOf(a / b);
        } catch (Exception e) {
            log.error("div error! {}/{}", a, b, e);
            return "some error!";
        }
    }

}
